import React,{ Component , Fragment} from 'react';
import {NavLink} from 'react-router-dom'
export default class CateItem extends Component{
    constructor(props){
        super(props);
    }

    render(){
        // console.log(hashHistory)
        let {pic,title} = this.props;
        let path={
            pathname:'/subgoodslist',
            query:this.props.title
        }
        return(
            <Fragment>
                <NavLink to={path}>
                <div className='cate-item-container'>
                    <img src={pic} alt=''/>
                    <span>{title}</span>
                </div>
                </NavLink>
            </Fragment>
        )
    }
}